package com.ohs.service;

import com.ohs.pojo.User;
import com.ohs.utils.ResponseResult;
import org.springframework.ui.Model;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.io.IOException;

public interface UserService {
    //根据邮箱查找当前用户信息
    ResponseResult findUserByEmail(String email);

    //根据用户名查找当前用户信息
    ResponseResult findUserByName(String userName);

    //注册
    ResponseResult doReg(User user , String confirmPwd, String code, HttpSession session);

    //用户名登录
    String doLogin(User user, String code, HttpSession session, Model model);

    //邮箱登录
    ResponseResult doEmailLogin(String email,String eCode,HttpSession session);

    ResponseResult updateUser(User user,HttpSession session);

    ResponseResult doUpdateAvartar(MultipartFile file, HttpSession session) throws IOException;

    User findUserOne(Integer userId);
}
